/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

import type {
  CreateKnowledgeBaseRequest,
  ResultPageResultKnowledgeBaseListVO,
  ResultRetrieveKnowledgeBaseVO,
  ResultVoid,
  RetrieveKnowledgeBaseRequest,
} from "./data-contracts";
import  { ContentType, HttpClient } from "./http-client";
import type { RequestParams } from "./http-client";

export class Knowledgebase<
  SecurityDataType = unknown,
> extends HttpClient<SecurityDataType> {
  /**
   * No description
   *
   * @tags 知识库管理
   * @name RetrieveKnowledgeBase
   * @summary 检索知识库
   * @request POST:/knowledgebase/retrieve
   * @secure
   */
  retrieveKnowledgeBase = (
    data: RetrieveKnowledgeBaseRequest,
    params: RequestParams = {},
  ) =>
    this.request<ResultRetrieveKnowledgeBaseVO, any>({
      path: `/knowledgebase/retrieve`,
      method: "POST",
      body: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    });
  /**
   * No description
   *
   * @tags 知识库管理
   * @name CreateKnowledgeBase
   * @summary 创建知识库
   * @request POST:/knowledgebase/create
   * @secure
   */
  createKnowledgeBase = (
    data: CreateKnowledgeBaseRequest,
    params: RequestParams = {},
  ) =>
    this.request<ResultVoid, any>({
      path: `/knowledgebase/create`,
      method: "POST",
      body: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    });

  /**
   * No description
   *
   * @tags 知识库管理
   * @name GetDefaultKnowledgeBaseList
   * @summary 获取默认知识库列表
   * @request GET:/knowledgebase/listdefault
   * @secure
   */
  getDefaultKnowledgeBaseList = (
    query?: {
      /**
       * 页码
       * @format int32
       * @default 1
       * @example 1
       */
      pageNo?: number;
      /**
       * 每页大小
       * @format int32
       * @default 10
       * @example 10
       */
      pageSize?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<ResultPageResultKnowledgeBaseListVO, any>({
      path: `/knowledgebase/listdefault`,
      method: "GET",
      query: query,
      secure: true,
      ...params,
    });
  /**
   * No description
   *
   * @tags 知识库管理
   * @name GetKnowledgeBaseList
   * @summary 分页查询知识库列表
   * @request GET:/knowledgebase/list
   * @secure
   */
  getKnowledgeBaseList = (
    query?: {
      /**
       * 页码
       * @format int32
       * @default 1
       * @example 1
       */
      pageNo?: number;
      /**
       * 每页大小
       * @format int32
       * @default 10
       * @example 10
       */
      pageSize?: number;
    },
    params: RequestParams = {},
  ) =>
    this.request<ResultPageResultKnowledgeBaseListVO, any>({
      path: `/knowledgebase/list`,
      method: "GET",
      query: query,
      secure: true,
      ...params,
    });
  /**
   * No description
   *
   * @tags 知识库管理
   * @name DeleteKnowledgeBase
   * @summary 删除知识库
   * @request DELETE:/knowledgebase/{id}
   * @secure
   */
  deleteKnowledgeBase = (id: string, params: RequestParams = {}) =>
    this.request<ResultVoid, any>({
      path: `/knowledgebase/${id}`,
      method: "DELETE",
      secure: true,
      ...params,
    });
}
